/**
 * Created on : 2012-6-20, 17:17:46
 *
 * @author Carmen
 */


window.onload = function(){    
    //点击更新验证码
    document.getElementById('getCode').onclick = function(){
        var rand=Math.random();
        this.setAttribute('src', APP+'/login/getCode/'+rand);
    }
    document.login.uname.focus();
    //提交表单验证
    document.login.onsubmit = function(){
        if (document.login.uname.value == '') {
            alert('请输入用户名');
            return false;
        }
        if (document.login.pwd.value == '' ){
            alert('请输入密码');
            return false;
        }
    }
}
